
//
//  CategoryModel.m
//  HeartOfMeet
//
//  Created by qianfeng on 16/4/2.
//  Copyright © 2016年 千云锋. All rights reserved.
//

#import "CategoryModel.h"

@implementation CategoryModel

//重写方法防止崩溃
- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
    NSLog(@"捕获到未定义的key = [%@]", key);
}

- (id)valueForUndefinedKey:(NSString *)key{
    
    return nil;
}

+ (NSMutableArray *)parseRespondsData:(NSDictionary *)dictionary{
    NSMutableArray *modelArray = [NSMutableArray array];
    NSArray *dataArray = dictionary[@"data"];
    for (NSDictionary *dic in dataArray) {
        CategoryModel *model = [[CategoryModel alloc] init];
        model.cover   = dic[@"cover"];
        model.title   = dic[@"title"];
        model.speak   = dic[@"speak"];
        model.viewnum = dic[@"viewnum"];
        model.url     = dic[@"url"];
        [modelArray addObject:model];
    }
    return modelArray;
}



@end


